<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
  <script>
    let arr = [1,2,3,1,2,3,'hello',true,false,'hello',true];
    //实现数组去重
    let obj = {};
    arr.forEach((item,index) => {
      obj[item] = index;
    });
    let arr2 = [];
    for(let pro in obj){
      arr2.push(pro);
    }
  </script>
</body>
</html>